Agent-based Modeling

نویسنده

  • Adam Getchell
چکیده

The theory and practice of agent-based modeling is reviewed, and agent-based modeling toolkits are evaluated and discussed. A tractable selection of toolkits, RepastPy, Repast Simphony, and breve are then employed to develop and visualize a series of increasingly sophisticated agent-based models, starting with a simple network-interaction diagram and proceeding onto the Boids 3D flock simulation, a 3D collision and gravity system, the chaotic Gray Scott diffusion reaction, a sophisticated agent behaviors game of Capture the Flag, finally culminating with an complex Boids evolutionary swarm simulation. To accomplish the latter, genetic programming techniques are briefly reviewed. Finally, an overview is presented with future directions. INTRODUCTION The use of computer systems to solve problems of interest in physics, biology, chemistry, economics, and social sciences has been well-established for decades. The great advances in computing power, software development, computer graphics, communications networks, and a host of other technologies have elevated the domain of applicability to problem solving from simple arithmetic calculations to advanced numerical methods and the creation of large simulations solving myriad systems of complex equations in real-time. A recent development has been the introduction of the Agent-Based Modeling paradigm, which has proven useful for a wide range of problems in physics and chaotic attractors [1], biology [2], economics [3], social science [4], and geospatial simulations [5]. Commensurate with this new paradigm has been the development of a range of toolkits to apply Agent-Based modeling to a particular range of problems. This purpose of this paper is to provide a general introduction to Agent-Based modeling and demonstrate its use in the modeling of a chaotic system. Organization is as follows: Section I begins with a general discussion of Agent-Based Modeling (hereafter ABM), including definitions and characteristics of systems amenable to this approach. Section II will provide an up-to-date review of the various Swarm modeling toolkits currently available at this time of writing. Section III will show the use of a particular toolkit, Repast, using both the simplified RepastPy interface and the more complex RepastS integrated development environment (IDE), and cover the development of a simple swarm model. Section IV will cover the simulation of the chaotic system ______, and Section V will wrap-up with conclusions and further references. SECTION I OVERVIEW Following the general overview by Castle and Crooks [6] and elsewhere [7], a dynamic model is defined as a simplified representation of reality that evolves over time. The unstated art behind this method is the intuition/experience in creating a simulation that is sufficiently complex enough to show interesting dynamics of the system, while being simple enough to have a tractable software representation on a computing system. In particular, “dynamics” is defined in as the study of change and evolving systems [8], while “tractable” is an artifact of the particular tool used. As we shall see, ABM makes particular classes of problems very easy to solve, that would otherwise be very difficult to attack using more traditional dynamical methods. For the purposes of this paper, an Agent, as part of an ABM system, is defined with the following characteristics:  Activity: Each agent independently acts according the rules of the simulation and their own preprogrammed behaviors. These rules and behaviors can take one or more of the following features: o Goal-direction: The agent acts in such a way as to achieve a particular goal, which can be either a relative or extremal value. For example, an agent may be designed to maximize accumulation of a particular resource. o Reactivity/Perceptivity: The agent senses its surroundings, or is supplied with a map such that it is aware of its environment. For example, an agent could be aware of resource node locations. o Bounded Rationality: Generally, goal-direction in agents operates on the rational-choice principle, which generally implies unlimited access to information and computational resources. However, experimental evidence suggests that non-optimal decisions are often closer to reality. Therefore, in order to provide greater predictive power, the agents can be constrained in terms of information resources or analytical ability. For example, an agent might be able to sense only those resource nodes within a finite range, or possess a map of resources that does not take into account the actions of other agents. o Interactivity: Continuing on the principle of bounded rationality, agents may interact or exchange information with other agents. These interactions may have particular effects on the agent, including its destruction or change in goal-seeking behavior. o Mobility: Interactivity with the environment and other agents is vastly improved if the agent can roam the model space independently. o Adaptation: Alteration of an agent’s current state based upon interactions with the environment or other agents provide a useful form of learning or memory. This adaptation can be provided for at the level of the individual agent, or groups of nearby agents, all the way up to the population level of the entire set of agents .  Autonomy: Each agent is free for activity as defined above, with the ability to make independent decisions.  Heterogeneity: Although each agent may begin as a member of a limited set of common templates, develops individuality through autonomous activity in the sense describe previously. Agents need a stage for their behaviors, and this is taken as the definition of the Environment. Although the environment may itself change dynamically according to the actions of the agents, these changes occur passively, rather than in the active fashion of agent time evolution. That is, the state of the environment evolves dynamically, but only in response to the actions of the agents, rather than as a result of particular goal-seeking or adaptive behavior. As an example, given an environment populated with resource nodes and a population of agents each looking to maximize intake of resources, the agents alter (consume) the distribution of resources, while the environment passively adjusts resource distribution based upon agent action. Granted, more complex environments are possible which dynamically alter their own resource distribution, but this alteration is typically given by a simple rule, rather than the result of goal-seeking behavior. (Note that more complex environments can be modeled in turn by the addition of a new group of agents to act as the “resources”). In sum, agents are active, while the environment is passive. As a final note, Agent Based Modeling (with particular distinctions) can also be found under the terms Agent-Based Computational Modeling [9], Agent-Based Social Simulation [4], Multi-Agent systems [10] [11], Distributed Artificial Intelligence [12] [13], and Swarm Intelligence [14] [15][16]. However, Agent Based Modeling and Swarm Intelligence appear to be the more contemporary of the terms used in the literature. SECTION II – AGENT BASED MODELING TOOLS There are good summaries in the literature which compare and contrast the various ABM tools [17] [18]. However, they are somewhat dated in terms of the versions of the tools that were reviewed. For example, de Smith et. al., though updated in 2008, referred to versions of Repast from 2006. The rapid pace of software, therefore, warranted a fresh look at the current state of the art. Given the previous reviews of ABM frameworks and libraries, this paper considers the following software:  Swarm [19] [20] – Latest stable release is Swarm 2.2 released in February 2005.  MASON [21] – Latest stable release is MASON Version 12, released in the July 2007 timeframe.  NetLogo [22] – Latest stable release is NetLogo version 4.0.2, released December 5, 2007.  RePast [23] – Latest stable release is Repast Simphony 1.0 released December 3, 2007.  MetaABM [24] – Latest stable release is  Breve [25] – Latest stable release is 2.7.2 released February 19, 2008. With the exception of NetLogo, all of these frameworks are both open source (hence, free for use and source code inspection) and based upon an object-oriented language (usually Java). This is due in large part because object oriented frameworks and programming is a natural fit for ABM. Swarm was originally written in Objective-C, and then ported to Java. Written as a library and framework of simulation tools, rather than as a finished application per se, Swarm is one of the oldest agent-based modeling toolkits, and there are hundreds of example applications and demos, and several of the newer toolkits are based upon it. However, given the age of the last stable release, and the existence of newer toolkits with more friendly environments (especially Repast), Swarm is not considered further in this paper. Nonetheless, the documentation and research papers on Swarm established many of the foundational concepts and ideas in ABM, and reading over these materials serves as an excellent introduction to the large and growing field of agent-based modeling. MASON, or Multi-Agent Simulator of Neighborhoods/Networks is a multiagent simulation library in Java, designed to serve as the base class structure for custom Java simulations. It also includes a model library and suite of 2D and 3D visualization tools, and is developed with an emphasis on speed and portability. Although well-regarded, at the time of this writing, the Windows batch files for starting and running MASON 12 did not work on Windows Vista 64-bit, so MASON is not considered further in this paper. NetLogo, though not open source in the strictest sense, is freeware, and designed for educational use, being based upon a simple Logo-type language. Originally developed in 1999 by Uri Wilensky, NetLogo has been under continuous development since then, and has a large and extensive user community with lists of community models. NetLogo is not considered in this paper primarily due to its use of a nonstandard programming language (Logo), which makes it more difficult to integrate with other toolsets and programs using object oriented programming languages more typically found in research (e.g. Java or Python). Repast is based upon Swarm, but implemented in Java from the ground up. Repast has several versions available; the current standard Repast Java version is version 3. A simplified version of Repast, RepastPy was produced that introduced a friendly GUI and the use of a subset of Python as a scripting language. RepastPy is quicker and easier to use than Repast, and is generally recommended by the Repast community as being a good version for prototyping models (leveraging the Python language characteristics of simplicity and productivity). Behind the scenes, the Python scripts generate Java objects. A version of Repast based on the .NET runtime, Repast.NET was made. The .NET runtime is flexible and powerful, and has a large number of useful libraries for doing almost anything, as well as an elegant successor language to Java, C#, and the ability to run any language that can be targeted on the .NET platform (including Visual Basic, Python, Ruby, and F# to name a few). Unfortunately, Repast.NET was written against the .NET 1.1 runtime, and appears not to have been updated since. The software source code contains project files which are not compatible with later versions of Visual Studio (Visual Studio 2008 was tried), and so extensive troubleshooting to correct this issue was skipped in favor of using other versions of Repast. Repast Simphony is the latest version of Repast, combining the powerful Eclipse integrated development environment with automated connectors to additional tools such as R, VisAD, Weka, MATLAB, and iReport. This paper will showcase both RepastPy and Repast Simphony. MetaABM is a powerful agent-based modeling system written by Miles Parker and including a neutral, standards-based representational format using the Eclipse Modeling Framework. MetaABM also features a powerful GUI environment based on Eclipse which can export models to other environments, including Repast Simphony and Ascape (another Swarm successor). SECTION III – RESULTS – REPAST, REPASTPY, REPAST SIMPHONY, AND BREVE All toolkits and software listed above, with the exception of Swarm (due to the existence of newer systems) and NetLogo (due to its Logo foundations) were installed and run using two machines: a Dell D830 Laptop with 2.4 GHz Core 2 Duo with 4GB of RAM, and a MacBook running MacOSX 10.5.3. Repast was initially designed to meet the needs for ABM in social sciences , including the use of geographic information systems. Repast Simphony offers a more robust toolset for 2 and 3D lattice simulations in the physical sciences. Repast was chosen for several reasons:  Ability to use several languages (Python, Java, .NET)  Quality of documentation  Quality of Repast Simphony IDE o Currently uses Groovy, a dynamic language for the Java Virtual Machine that compiles to Java byte-codes, but offers features like Domain-Specific Language support, annotations, generics, and meta-programming. [26] o Ability to “freeze-dry” simulations. Models can be run, serialized to a flat file structure (similar to Python’s pickle), and then re-hydrated to pick up where the simulation left off on a different system. o Built-in support for the export of data to movies, VisAd (interactive visualization toolkit) [27], Weka (machine learning toolkit) [28], or MatLab.  Currency of Implementation – In particular, Simphony installs on current versions of operating systems such as Windows Vista. (Although RepastPy must run as Administrator, which presents issues of file storage in that the user must be able to access the same directory used by the Administrator to save the model, and the default Documents directory is the Administrators’ Document directory, hence inaccessible to the typical user. Likewise, networked user directories are unavailable to the Administrator without an explicit network share.) Given the heavy Python use in current class work, the first model chosen was done using RepastPy. However, RepastPy quickly showed limitations in the original design slant towards social science modeling. For example, only 2D grids could be generated. Nevertheless, a nicely illustrative network simulation model showing agent based interactions was created and run in a very short time. Figure 1: RepastPy network model setup screen

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Conceptual Agent based Modeling in Supply Chain: An Economic Perspective

Abstract: The implementation of government legislation, social responsibility, environmental concerns regarding the reduction of waste, hazardous material and other consumer residuals have made the competition between the firms stricter than ever and nowadays firms that want to survive need a more productive and innovative approach toward the financial aspects of their businesses.his pape...

متن کامل

An Agent- based Modeling for Breast Tissue Simulation and the Growth and Spread of Tumor in Various Breast Cancer States

Introduction: Breast cancer is a cancer that is caused by abnormal growth of breast cells. Modeling  and simulation of the growth and treatment of breast cancer, along with providing the possibility of doing experiments and research, can reduce the time and cost of treatment by predicting some cases. The purpose of the present research was to develop an agent-based model for the simulation of b...

متن کامل

A review of agent-based modeling (ABM) concepts and some of its main applications in management science

We live in a very complex world where we face complex phenomena such as social norms and new technologies. To deal with such phenomena, social scientists often use reductionism approach where they reduce them to some lower-lever variables and model the relationships among them through a scheme of equations. This approach that is called equation based modeling (EBM) has some basic weaknesses in ...

متن کامل

Agent-Based Modeling of Day-Ahead Real Time Pricing in a Pool-Based Electricity Market

In this paper, an agent-based structure of the electricity retail market is presented based on which day-ahead (DA) energy procurement for customers is modeled. Here, we focus on operation of only one Retail Energy Provider (REP) agent who purchases energy from DA pool-based wholesale market and offers DA real time tariffs to a group of its customers. As a model of customer response to the offe...

متن کامل

The Study of CO Symptoms' Impacts on Individuals, Using GIS and Agent-based Modeling (ABM)

The purpose of this study is to use both agent-based modeling as a new method in modeling dynamic phenomena and GIS to show the effects of carbon monoxide (CO) on individuals in the city of Tehran. After collecting the latest information about the severity of carbon monoxide pollutants on different days, one of the days with a very high severity of this pollutant has been selected for investiga...

متن کامل

The Study of CO Symptoms' Impacts on Individuals, Using GIS and Agent-based Modeling (ABM)

The purpose of this study is to use both agent-based modeling as a new method in modeling dynamic phenomena and GIS to show the effects of carbon monoxide (CO) on individuals in the city of Tehran. After collecting the latest information about the severity of carbon monoxide pollutants on different days, one of the days with a very high severity of this pollutant has been selected for investiga...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008